﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using ServerDataObject;
using BussinesLayer;

namespace WCFServiceWebRole1
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    public class Service1 : IService1
    {
        readonly Storage storage = new Storage();

        public List<ChallengeShort> GetChallengeList(ChallengeFiler filter)
        {
            return storage.GetChallengeList(filter);
        }
        public List<PersonScore> GetPersonScore()
        {
            return storage.GetPersonScore();
        }
        public Challenge GetChallenge(Guid id)
        {
            return storage.GetChallenge(id);
        }

        public void SyncChanges(SyncChallenges data)
        {
            storage.SyncChanges(data);
        }
    }
}
